package tech.aistar.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tech.aistar.entity.Reply;

import java.util.List;

public interface ReplyMapper {
    @Select("select * from reply")
    List<Reply> selectAll();

    @Insert("insert into reply values(tenantId,houseId,myReply,problemId,thumpUpNumber,replyTime)")
    void insert(Reply reply);
    @Update("update reply set tenant_id=#{tenantId},house_id=#{houseId}" +
            ",my_reply=#{myReply},problem_id=#{problemId},thump_up_number=#{thumpUpNumber}" +
            ",reply_time=#{replyTime} where id=#{Id}")
    void  updateByPrimaryKey(Reply reply);


    @Delete("delete from reply where id=#{id}")
    void deleteByPrimaryKey(Reply reply);
}
